<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>

        /* 垂直的块级盒子会有外边距合并的问题 */
        div{
            width: 200px;
            height: 200px;
            background-color: pink;
        }
        div:first-child{
            margin-bottom: 100px;
        }
        div:last-child{
            background-color: purple;
            margin-top: 50px;
        }
    </style>
</head>
<body>
    <div>

    </div>
    <div>

    </div>
</body>
</html>